home *** CD-ROM | disk | FTP | other *** search
- Path: user12.infohouse.com!user
- From: kelvin@infohouse.com (Kelvin Eng)
- Newsgroups: comp.lang.c++
- Subject: HELP WITH C PROGRAMMING
- Date: 19 Jan 1996 23:07:32 GMT
- Organization: Internet Online Services
- Message-ID: <kelvin-1901961812350001@user12.infohouse.com>
- NNTP-Posting-Host: user12.infohouse.com
-
- I have a few C-Programming Questions that need to be answer, if you can
- answer or or even one, it would be of great help and would be greatly
- appreciated.
-
- 1) Write a program which prompts the user for integer values for a, b, c,
- and d and outputs a table of values of the following polynomial: an3 + bn2
- + cn + d = f(n) for values of n from O to 10.
-
- Number 2 is to be done using C-Robots
-
- 2) Write a robot which immediately travels to the center coordinates of
- the screen, stays there and fires continuously in a clockwise pattern
- exactly 30 shots per each rotation.
-
- 3) Write a function which accepts three arguments and evaluates the
- discriminant of a
- quadratic equation: b(squared)-4ac. The function returns 1 if the
- discriminant is greater than zero, -1 if less than zero and zero
- otherwise.
-
- 4) Write a function which accepts 2 integer arguments and returns the sum
- of the squares of all the integers between those arguments (and including
- them.)
-
- 5) Use a calculator, to write the output for this fragment:
-
- main()
-
- {
- float x = 79.1;
-
- num= 1.0;
-
- while(abs_val(num*num - x) > = .0000001)
-
- {
- num = (x/num + num) / 2;
- printf(" %f\n",num);
- }
- }
-
- 6) Write a function which prints out a list of Pythagorean triples in
- which the legs differ by 1.
- The function checks whether x(squared) + (x+ 1)(squared) is a perfect
- square as x increases from 3 to the limit of the computer:
-
- 3 4 5
-
- 20 21 29
-
- etc.
-
- 7) Write a program containing a function called "convert" which accepts a
- single float
- argument (░F) and returns its centigrade equivalent (nearest hundredth), using:
- C░ = 5 (F░-32) / 9
- The program must prompt the user to enter a temperature.
-
-
-
- Thanks in any help HELP
- Please email me at: kelvin@infohouse.com with any answers.
- I really appreciate it.
-